/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author dvasquez
 */
@Embeddable
public class InformeReferenciaDCArPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "nroInfReferencia")
    private int nroInfReferencia;
    @Basic(optional = false)
    @Column(name = "ID")
    private int id;

    public InformeReferenciaDCArPK() {
    }

    public InformeReferenciaDCArPK(int nroInfReferencia, int id) {
        this.nroInfReferencia = nroInfReferencia;
        this.id = id;
    }

    public int getNroInfReferencia() {
        return nroInfReferencia;
    }

    public void setNroInfReferencia(int nroInfReferencia) {
        this.nroInfReferencia = nroInfReferencia;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nroInfReferencia;
        hash += (int) id;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InformeReferenciaDCArPK)) {
            return false;
        }
        InformeReferenciaDCArPK other = (InformeReferenciaDCArPK) object;
        if (this.nroInfReferencia != other.nroInfReferencia) {
            return false;
        }
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.InformeReferenciaDCArPK[nroInfReferencia=" + nroInfReferencia + ", id=" + id + "]";
    }

}
